package router

import (
	"github.com/gin-gonic/gin"
	"gowork_0911/gym/handler/service"
	"gowork_0911/gym/jwt"
)

func Router() *gin.Engine {
	r := gin.Default()
	AuthGroup := r.Group("/auth")
	AuthGroup.Use(jwt.AuthJWt())
	{
		AuthGroup.POST("/courseAdd", service.CourseAdd)
	}

	r.POST("/login", service.Login)
	r.GET("/chat", service.Chat)
	return r
}
